package com.jsj.domain;

import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.stereotype.Component;

@Component
public class Submission extends BaseEntity {
    /**
     * 题目提交id
     */
    private long id;

    /**
     * 作业提交
     */
    private int subtopId;

    /**
     * 题目
     */
    private int problemId;

    /**
     * 长度
     */
    private int length;

    /**
     * 文件位置
     */
    private String location;

    public Submission(long id, int subtopId, int problemId, int length, String location) {
        this.id = id;
        this.subtopId = subtopId;
        this.problemId = problemId;
        this.length = length;
        this.location = location;
    }

    public Submission() {
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int getSubtopId() {
        return subtopId;
    }

    public void setSubtopId(int subtopId) {
        this.subtopId = subtopId;
    }

    public int getProblemId() {
        return problemId;
    }

    public void setProblemId(int problemId) {
        this.problemId = problemId;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("subtopId", getSubtopId())
                .append("problemId", getProblemId())
                .append("length", getLength())
                .append("location", getLocation())
                .toString();
    }
}
